package com.kcwl.carrier.domain.repository;

import com.kcwl.carrier.domain.entity.BindListVo;
import com.kcwl.carrier.domain.entity.VehicleInfo;
import com.kcwl.carrier.domain.entity.VehicleInfoListVo;
import com.kcwl.carrier.domain.entity.VehicleInfoVo;
import com.kcwl.carrier.infrastructure.repository.po.VehicleInfoPO;
import com.kcwl.carrier.interfaces.dto.BaseInfoDTO;
import com.kcwl.carrier.interfaces.dto.OrderVehicleDTO;
import com.kcwl.carrier.interfaces.query.MobileQuery;
import com.kcwl.carrier.interfaces.query.OrderVehicleQuery;
import com.kcwl.carrier.interfaces.query.UserIdQuery;
import com.kcwl.carrier.interfaces.query.VehicleQuery;
import com.kcwl.ddd.domain.entity.KcPage;
import com.kcwl.ddd.domain.repository.IBaseRepository;

import java.util.List;
import java.util.Map;

/**
 * @author 刘旭超
 * @date 2022年07月11日 16:33
 * @Description
 */
public interface IVehicleInfoRepository extends IBaseRepository<VehicleInfoPO> {
    Long insert(VehicleInfo vehicleInfo);

    int updateById(VehicleInfo vehicleInfo);

    List<VehicleInfo> selectList(VehicleInfo vehicleInfo);

    int updateVehicleCategory(VehicleInfo vehicleInfo);

    boolean countTrailerBindNum(Map<String, Object> params);

    Integer selectCount(VehicleInfo countVehicleInfo);

    Integer getVehicleCount(VehicleQuery query);

    KcPage<VehicleInfoVo> getVehiclePage(VehicleQuery query);

    Integer updateVehicleTrail(Long id);

    List<VehicleInfo> getUnBindVehicles(UserIdQuery query);

    List<VehicleInfo> queryByIds(List<Long> ids);

    VehicleInfoVo getHistoryVehicle(VehicleInfo vehicleInfo);

    KcPage<VehicleInfoListVo> queryVehiclePage(VehicleQuery query);

    List<VehicleInfoListVo> findAuthCarNum(List<Long> idList);

    void delTrailerBind(Long trailerId);

    List<BaseInfoDTO> getBaseInfoByMobile(MobileQuery query);


    List<OrderVehicleDTO> getAllOrderVehicle(OrderVehicleQuery query);

    KcPage<VehicleInfo> getAppropriateVehicles(VehicleQuery query);

    VehicleInfo queryByTrailerId(Long trailerId, Long carrierId);
}
